<template>
    <div class="bg-white mt-[10px]">
        <BaseHead> 转载情况</BaseHead>
        <div class="p-[10px] w-10/12 mx-auto">
            <el-table :data="slTable" border style="width: 100%">
                <el-table-column prop="reshipId" label="转载名称">
                    <template #default="scope">
                        <Feedback :id="scope.row.reshipId" :list="zzmcList" :mapping="['codeColumn', 'valueColumn']">
                        </Feedback>
                    </template>
                </el-table-column>
                <el-table-column prop="reshipType" label="转载类型">
                    <template #default="scope">
                        <Feedback :id="scope.row.reshipType" :list="zzlxList">
                        </Feedback>
                    </template>
                </el-table-column>
                <el-table-column prop="reshipDate" label="转载时间" />
                <el-table-column prop="note" label="备注"></el-table-column>
            </el-table>
        </div>
    </div>
</template>
<script setup>
import BaseHead from "@/views/project/components/BaseHead.vue";
import { getpaperReshipInfo } from "@/api/achievement/kycg"
import useCategoryStore from "@/store/modules/category";

const props = defineProps({
    productId: String,
})

const categoryStore = useCategoryStore();
const { zzlxList, zzmcList } = storeToRefs(categoryStore); // 解构状态
const { getzzlxList, getzzmcList } = categoryStore; // 解构方法

const slTable = ref([])
const getTable = () => {
    getpaperReshipInfo(props.productId).then((res) => {
        if (res.code == 200) {
            slTable.value = res.data
        }
    })
}
const getCategoryMet = () => {
    if (!zzlxList.value.length) {
        getzzlxList()
    }
    if (!zzmcList.value.length) {
        getzzmcList()
    }
}
getCategoryMet()
getTable()
</script>
<style scoped lang="scss">
@import url("@/views/achievement/index.scss");
</style>
<style lang="scss">
.slDig {
    padding: 0;
    background-color: #f0f2f5;
    height: 70vh !important;
    overflow-y: hidden;
    margin-top: 25vh !important;

    .el-dialog__body {
        height: 82%;
        overflow: auto;
        padding-bottom: 55px;
    }

}

.slDig:not(.is-fullscreen) {
    margin-top: 15vh !important;
}
</style>